package MyBinaryTree;

public class TreeNode<T> {
	private T data;
	private TreeNode<T> left;
	private TreeNode<T> right;
	
	{
		data=null;
		left=null;
		right=null;
	}
	
	public TreeNode(T data){
		this.data=data;
	}
	
	public T getData(){
		return this.data;
	}
	
	public void setData(T data){
		this.data=data;
	}
	
	public void setLeft(TreeNode<T> left){
		this.left=left;
	}
	
	public TreeNode<T> getLeft(){
		return this.left;
	}
	
	public void setRight(TreeNode<T> right){
		this.right=right;
	}
	
	public TreeNode<T> getRight(){
		return this.right;
	}
}
